﻿using Microsoft.EntityFrameworkCore;
using MindASPCoreWebAPI.PoModel.SystemManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace MindASPCoreWebAPI.Repository.CommonLib
{
    public class SystemCenterMindContext:DbContext
    {
        public DbSet<ActhModel> ActhModel { get; set; }
        public DbSet<ActiareaModel> ActiareaModel { get; set; }
        public DbSet<ActivityAdminModel> ActivityAdminModel { get; set; }
        public DbSet<AreaModel> AreaModel { get; set; }
        public DbSet<CompanyAdminModel> CompanyAdminModel { get; set; }
        public DbSet<CustAdminModel> CustAdminModel { get; set; }
        public DbSet<IndustryAdminModel> IndustryAdminModel { get; set; }
        public DbSet<KaModel> KaModel { get; set; }
        public DbSet<LangModel> LangModel { get; set; }
        public DbSet<LevelModel> LevelModel { get; set; }
        public DbSet<NatModel> NatModel { get; set; }
        public DbSet<PosiModel> PosiModel { get; set; }
        public DbSet<TypeModel> TypeModel { get; set; }
        public DbSet<DictionariesModel> DictionariesModel { get; set; }
        public DbSet<AdminModel> AdminModel { get; set; }
        public DbSet<Admin_RoleModel> Admin_RoleModel { get; set; }
        public DbSet<RoleModel> RoleModel { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                optionsBuilder.UseSqlServer("Data Source=82.156.201.118;database=MindASPCoremaster;uid=sa;pwd=123456");
                //optionsBuilder.UseSqlServer("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TestDB;Data Source=.");//数据库连接字符串，其中TestDB是数据库名称
            }
        }
        //public DbSet<ActiareaModel> ActhModel { get; set; }

        //public SystemCenterMindContext(DbContextOptions<SystemCenterMindContext> options) : base(options)
        //{

        //}
    }
}
